Skip to content

Conversation

@RafaelKayumov
Copy link
Contributor

@RafaelKayumov RafaelKayumov commented Nov 7, 2025

WOOMOB-1653

Description

Repetitive order details presentation from booking was broken on iPhone. If a booking order was presented by tapping on "View Order" in booking details, dismissed and then triggered to be presented again - the order details won't be opened the second time.

The issue is happening because selectedOrderID and selectedIndexPath keep their value even when order details get dismissed on iPhone. The following logic prevented the details presentation:

let orderNotAlreadySelected = selectedOrderID != orderID
let indexPath = dataSource.indexPath(for: identifier)
let indexPathNotAlreadySelected = selectedIndexPath != indexPath
let shouldSwitchDetails = orderNotAlreadySelected || indexPathNotAlreadySelected

To resolve the above issue the isTriggeredByUserAction attribute was added to force order details presentation if the navigation was manually triggered by the user action. Also the derails presentation logic was changed in OrdersSplitViewWrapperController - the new details VC wasn't re-created and applied in case if the new order has the same id. In that case the existing details VC was obtained and re-presented.

Test Steps

TC1: Basic scenario

  • Run on iPhone and iPad at the same time to compare behaviour.
  • Use CIAB site with existing bookings and corresponding orders.
  • Navigate to a booking that has an order.
  • In booking details tap on "View Order" CTA
  • Make sure the "Orders" tab is opened and the corresponding order is selected in orders list and also presented in Order Details screen.
  • Dismiss the booking details (on iPhone)
  • Go back to the Bookings tab where the same booking is opened.
  • Tap on the "View Order" CTA again.
  • Make sure the Order Details correctly re-opened in Orders tab.
OrderReSelectDemo1.mov

TC2: don't dismiss the order details

  • Repeat the steps from the TC1 but skip the "Dismiss the booking details"
  • Make sure when the order details are opened for the 2nd time - there is no screen re-creation. The same screen should be just re-opened.
Demo2.mov

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@RafaelKayumov RafaelKayumov added this to the 23.7 milestone Nov 7, 2025
@RafaelKayumov RafaelKayumov added type: bug A confirmed bug. Bug labels Nov 7, 2025
@RafaelKayumov RafaelKayumov marked this pull request as ready for review November 7, 2025 15:58
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 7, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16331-89992ef
Version23.6
Bundle IDcom.automattic.alpha.woocommerce
Commit89992ef
Installation URL4tkjn9pkvngo0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo self-assigned this Nov 10, 2025
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as described ✅

Is it intentional to fix this only for bookings with orders? I checked a booking without order and saw the same issue as the one this PR is fixing, I wonder if it's worth it to fix that too.

Simulator.Screen.Recording.-.iPhone.17.-.2025-11-10.at.13.06.29.mov

Please feel free to ignore this as every booking is supposed to have an associated order in the MVP anyway.

@RafaelKayumov
Copy link
Contributor Author

This works as described ✅

Is it intentional to fix this only for bookings with orders? I checked a booking without order and saw the same issue as the one this PR is fixing, I wonder if it's worth it to fix that too.

Simulator.Screen.Recording.-.iPhone.17.-.2025-11-10.at.13.06.29.mov
Please feel free to ignore this as every booking is supposed to have an associated order in the MVP anyway.

Gonna handle that separately WOOMOB-1674

@RafaelKayumov RafaelKayumov merged commit 1b2dd0a into trunk Nov 10, 2025
14 checks passed
@RafaelKayumov RafaelKayumov deleted the WOOMOB-1653-handle-order-details-re-selection-issue branch November 10, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants